package com.saas.datasource.core;

import com.saas.datasource.core.druid.DruidDataSourceConfig;
import com.saas.datasource.core.hikari.HikariCpConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.Map;

/**
 * config参数配置
 */
@Configuration
@ConfigurationProperties(prefix = "spring.datasource")
public class DataSourceConfig {
    private String configType;
    private DruidDataSourceConfig dsaas;
    private Map<String,DruidDataSourceConfig> dlist;
    private HikariCpConfig hsaas;
    private Map<String,HikariCpConfig> hlist;

    public String getConfigType() {
        return configType;
    }

    public void setConfigType(String configType) {
        this.configType = configType;
    }

    public DruidDataSourceConfig getDsaas() {
        return dsaas;
    }

    public void setDsaas(DruidDataSourceConfig dsaas) {
        this.dsaas = dsaas;
    }

    public Map<String, DruidDataSourceConfig> getDlist() {
        return dlist;
    }

    public void setDlist(Map<String, DruidDataSourceConfig> dlist) {
        this.dlist = dlist;
    }

    public HikariCpConfig getHsaas() {
        return hsaas;
    }

    public void setHsaas(HikariCpConfig hsaas) {
        this.hsaas = hsaas;
    }

    public Map<String, HikariCpConfig> getHlist() {
        return hlist;
    }

    public void setHlist(Map<String, HikariCpConfig> hlist) {
        this.hlist = hlist;
    }
}